
pkgname=p11-kit
pkgver=0.23.12
pkgrel=1
pkgdesc="Library to work with PKCS#11 modules"
arch=('x86_64')
url="https://p11-glue.freedesktop.org"
license=('BSD')
depends=('glibc' 'libtasn1' 'libffi')
options=('!libtool')
source=("https://github.com/p11-glue/p11-kit/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz")
md5sums=('bad7f9f29e02f4ddb6187eae01a29fd2')

build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --libexecdir=/usr/lib \
    --with-module-path=/usr/lib/pkcs11
  make
}

package() {
  cd  ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install

  install -Dm644 COPYING $pkgdir/usr/share/licenses/${pkgname}/COPYING
}
